import request from '@/utils/request'


// 修改仓库状态
export function changeWareStatus (id, status) {
  return request({
    url: '/wms/ware/changeWareStatus',
    method: 'get',
    params: {
      id, status
    }
  })
}
// 查询仓库 树形结构
export function getCascaderWare () {
  return request({
    url: '/wms/ware/getCascaderWare',
    method: 'get'
  })
}
// 查询仓库列表
export function listWare (query) {
  return request({
    url: '/wms/ware/list',
    method: 'get',
    params: query
  })
}

// 查询仓库详细
export function getWare (id) {
  return request({
    url: '/wms/ware/' + id,
    method: 'get'
  })
}

// 新增仓库
export function addWare (data) {
  return request({
    url: '/wms/ware',
    method: 'post',
    data: data
  })
}

// 修改仓库
export function updateWare (data) {
  return request({
    url: '/wms/ware',
    method: 'put',
    data: data
  })
}

// 删除仓库
export function delWare (id) {
  return request({
    url: '/wms/ware/' + id,
    method: 'delete'
  })
}
